package attend.action.login;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ActionContext;
import java.util.Map;
import java.util.*;

public class logoutAction extends ActionSupport{
	private static final long serialVersionUID = 1L;
	//private Map session;
	private String user_id;
	private String pass;
	
	private String permission;
	private Date sessionTime;
	private Map<String, String> session;
	
	public String execute() throws Exception { 
		session = ActionContext.getContext().getApplication();
		session.remove("id");
		session.remove("password");
		session.remove("permission");
		session.remove("getCreationTime()");
		session.remove("session.getCreationTime()");
	    session.clear();
	    session.values().clear();
	    System.out.println("getCreationTime() ================> "+sessionTime);
	    System.out.println("session_logout ===================> "+session);
	    
	    return SUCCESS;
    }
	
	public Map getSession() {
		return session;
	}

	public void setSession(Map session) {
		this.session = session;
	}

	public String getPermission() {
		return permission;
	}

	public void setPermission(String permission) {
		this.permission = permission;
	}

	public Date getSessionTime() {
		return sessionTime;
	}

	public void setSessionTime(Date sessionTime) {
		this.sessionTime = sessionTime;
	}
	
	public String getUser_id() {
		return user_id;
	}

	public void setUser_id(String user_id) {
		this.user_id = user_id;
	}

	public String getPass() {
		return pass;
	}

	public void setPass(String pass) {
		this.pass = pass;
	}

} 